import { defineNuxtPlugin } from '#app';
import {
	Icon, Image, Cell, CellGroup, Tabbar, TabbarItem, Swipe, SwipeItem, NoticeBar, PasswordInput, NumberKeyboard, Overlay, Loading,
	Notify, Sticky, Sidebar, SidebarItem, IndexBar, IndexAnchor, Card, Tag, Stepper, Lazyload, ActionSheet, Button, Badge, SubmitBar, NavBar, Form,
	Field, Switch, ContactCard, Uploader, Popover, Tabs, Tab, PullRefresh, Empty, Grid, GridItem, Popup,RadioGroup,Radio
} from 'vant';

// 目前在 nuxt 中无法按需引入样式，因此采用手动引入的方式
import 'vant/lib/index.css';

export default defineNuxtPlugin((nuxtApp) => {
	nuxtApp.vueApp
		.use(Image)
		.use(Icon)
		.use(Cell)
		.use(CellGroup)
		.use(Tabbar)
		.use(Swipe)
		.use(SwipeItem)
		.use(NoticeBar)
		.use(PasswordInput)
		.use(NumberKeyboard)
		.use(Overlay)
		.use(Loading)
		.use(Notify)
		.use(Sticky)
		.use(Sidebar)
		.use(SidebarItem)
		.use(IndexBar)
		.use(IndexAnchor)
		.use(Card)
		.use(Tag)
		.use(Stepper)
		.use(Lazyload, { lazyComponent: true, })
		.use(Badge)
		.use(SubmitBar)
		.use(ActionSheet)
		.use(Button)
		.use(Lazyload)
		.use(NavBar)
		.use(Form)
		.use(Field)
		.use(Switch)
		.use(ContactCard)
		.use(Uploader)
		.use(Popover)
		.use(TabbarItem)
		.use(Tabs)
		.use(Tab)
		.use(PullRefresh)
		.use(Empty)
		.use(GridItem)
		.use(Grid)
		.use(Popup)
		.use(RadioGroup)
		.use(Radio)
});